home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Camelot / Camelot 064 (1990-02)(Swedish User Group of Amiga)(SE)(PD)[WB].zip / Camelot 064 (1990-02)(Swedish User Group of Amiga)(SE)(PD)[WB].adf / PLT / HPGL_commands < prev    next >
Text File  |  1990-02-14  |  12KB  |  337 lines

  1.                            HP-GL COMMANDS
  2.                            --------------
  3.  
  4.  
  5. The following is a list of the HP-GL commands that are currently
  6. supported by PLT:.  For the most part they were implemented from the 
  7. descriptions provided in the "HP ColorPro Graphics Plotter Programming 
  8. Manual".  It appears as though every HP plotter has a slightly different
  9. set of HP-GL commands.  Some have extra commands, some of the commands that
  10. have parameters for one plotter may not have parameters for a different
  11. plotter (PA and PR come to mind).  We followed the manual pretty accurately,
  12. but we borrowed a couple of commands from a different plotter to control
  13. when a page is ejected from the plotter.  For example, the AF command
  14. causes a page to be printed, this allows people to send several pages of
  15. plots to PLT: without having to break the input up into several files 
  16. or several executions.  Some commands in the manual were not emulated
  17. since they did not make sense for a raster emulation of a plotter.
  18.  
  19.  
  20.  
  21. o   The <term> symbol signifies a command terminator, it may be a space, a 
  22.     semi-colon or the first character of the next command.
  23.  
  24. o   Command names are NOT case sensitive.
  25.  
  26. o   Parameters that are incased in parenthesis in the command description 
  27.     are optional parameters.  Do not use the paranthesis when specifying the
  28.     command.
  29.  
  30.  
  31. ----------------------------------------------------------------------------
  32. ----------------------------------------------------------------------------
  33.  
  34.  
  35. Advance Full Page
  36. AF <term>
  37.         Causes a page to be plotted/printed
  38.  
  39.  
  40. Designate Alternate Character Set
  41. CA font_number <term>           
  42. CA <term>
  43.         Selects font_number to be the alternate character set.
  44.         The alternate character set is used as the current font
  45.         through the use of the SA command.
  46.         0 <= font_number <= 50
  47.  
  48.                 
  49. Character Plot
  50. CP spaces, lines <term>
  51. CP <term>
  52.         Moves the pen the specified number of character plot cells.
  53.         All movements are relative to the current label direction.
  54.         
  55.                         spaces          lines
  56.         ----------------------------------------------
  57.         positive        move right      move left
  58.         negative        move up         move down
  59.  
  60.         A CP command with no parameters performs a carriage return and a
  61.         line feed.
  62.  
  63.  
  64. Designate Standard Character Set
  65. CS font_number <term>
  66.         Selects font_number to be the standard character set.
  67.         The standard character set is used by default or 
  68.         through the use of the SS command.
  69.         0 <= font_number <= 50
  70.  
  71.  
  72. Default
  73. DF <term>
  74.         Set certain plotter functions to predefined defaults.
  75.         This command maintains the locations of P1 and P2.
  76.  
  77.                              Default Conditions
  78.  
  79.         Function        Equivalent Instructions         Conditions
  80.         -----------------------------------------------------------
  81.         Plotting mode           PA;                     Absolute
  82.         Line type               LT;                     Solid line
  83.         Line pattern            LT;                     4% of (P1, P2)
  84.                 length
  85.         Relative Character      DR1,0;                  Horizontal
  86.                 Direction
  87.         Relative Character      SR;                     width=.75% of (P2x-P1x)
  88.                 Size                                    height=1.5% of(P2y-P1y)
  89.         Standard Character      CS0;                    set 0
  90.                 Set
  91.         Alternate Character     CA0;                    set 0
  92.                 Set
  93.         Character Set           SS;                     standard
  94.                 Selected
  95.         Character Slant         SL0;                    0 degrees
  96.         Label Terminator        DTetx;                  etx(ascii code 3)
  97.         Symbol Mode             SM;                     Off
  98.         Tick Length             TL;                     tp=tn=.5% of |P2x-P1x|
  99.                                                                 for y tick
  100.                                                         tp=tn=.5% of |P2y-P1y|
  101.                                                                 for x tick
  102.         Scale                   SC;                     User-unit scaling off
  103.  
  104.  
  105. Absolute Direction
  106. DI run, rise <term>
  107. DI <term>
  108.         Specifies the direction in which labels are drawn, independent of
  109.         P2 and P1 settings. If no parameters are given, then the direction
  110.         is set for horizontal.
  111.  
  112.         run = cos(angle)
  113.         rise = sin(angle)
  114.  
  115.         angle = arctan(rise/run)
  116.  
  117.  
  118. Relative Direction
  119. DR run, rise <term>
  120. DR <term>
  121.         Specifies the direction that labels are drawn relative to the
  122.         scaling points P1 and P2.  When the scaling points move, the
  123.         label direction is adjusted to maintain the same relationship.
  124.         A DR command with no parameters sets the direction for horizontal.
  125.  
  126.         run  -- the percentage of P2x - P1x
  127.         rise -- the percentage of P2y - P1y
  128.  
  129.  
  130. Define Label Terminator
  131. DT label_terminator <term>
  132.         The character immediately following the DT command is used as
  133.         the new label terminator.  The label terminator is the
  134.         character that signifies when the data for the label is complete
  135.         so the plotter can start interpreting the input stream as commands
  136.         again.  Be careful not to place a space between the DT and the 
  137.         character that you want for the terminator.  Otherwise the space
  138.         will become the new terminator.
  139.  
  140.  
  141. Initialize
  142. IN <term>
  143.         Returns the plotter to its power on state.  Performs a DF AND:
  144.  
  145.         o   raises the pen
  146.         o   sets P1 and P2 to the default states
  147.         o   cancels 90 degree rotation
  148.  
  149.  
  150.  
  151. Input P1 and P2
  152. IP P1x, P1y (, P2x, P2y) <term>
  153. IP <term>
  154.         P1 and P2 are used as scaling points for fonts as well as for
  155.         establishing the location for a user-defined coordinate system.
  156.  
  157.         Can either specify the positions of both scaling points, just the
  158.         first, or reset them to their defaults by specifying no parameters.
  159.         If only P1 in specified, then P2 will move to keep the distance
  160.         between P1 and P2 constant (P2 tracks P1).
  161.  
  162.         Defaults:
  163.         ---------
  164.                 P1x =   250
  165.                 P1y =   279
  166.                 P2x = 10250
  167.                 P2y =  7479
  168.  
  169.  
  170. Label
  171. LB c...c <label_terminator>
  172.         Puts text on the page starting at the current pen position.  
  173.         Every character between LB and <label_terminator> is plotted.
  174.         <label_terminator> is usually ascii code 3, but can be set by
  175.         the DT command.  The LB command uses the current selected font
  176.         and current label direction.
  177.  
  178.  
  179. Line Type
  180. LT pattern_number (, pattern_length) <term>
  181. LT <term>
  182.         Selects the type of line that is plotted when the pen is down
  183.         and moving. An LT command without a parameter specifies a solid line.
  184.         Pattern 0 puts a dot at the endpoints of a line.
  185.         Patterns 1-6 are dotted, dashed, dashed-dotted combinations.
  186.         
  187.         The length of the pattern can be specified through the use of
  188.         pattern_length.  It is expressed as the percentage of the
  189.         diagonal distance between P1 and P2.  
  190.  
  191.         Any portion of a pattern not used for the current line is
  192.         carried over to the next line (provide a PU is not issued).
  193.  
  194.  
  195. Plot Absolute
  196. PA X, Y (, ...) <term>
  197. PA <term>
  198.         Place the plotter in absolute mode.  Causes all coordinates to then
  199.         be interpretted as actual coordinates and not offsets from the 
  200.         current pen position.  Coordinates can be specified with the 
  201.         command as well.  It this case the pen is moved to the 
  202.         appropriate locations.  If the pen is down a line will be drawn
  203.         in the current pattern.  If the pen is up then it is merely moved
  204.         through the coordinates without drawing lines.
  205.  
  206.  
  207. Pen Down
  208. PD X, Y (, ...) <term>
  209. PD <term>
  210.         Places the pen down onto the paper.  If coordinates are specified 
  211.         then the pen is moved to those locations (absolutely or relatively
  212.         depending on the current status).  A line is drawn using the
  213.         current pattern.
  214.  
  215.  
  216. Page Forward
  217. PG <term>
  218.         Performs the same function as AF.  Added to PLT: to allow greater
  219.         compatibility with slightly different plotter command sets.
  220.  
  221.  
  222. Pen Up
  223. PU X, Y (, ...) <term>
  224. PU <term>
  225.         Raises the pen.  If coordinates are given then the pen is moved
  226.         (relatively or absolutely depending on the current status) to the
  227.         specified locations.
  228.  
  229.  
  230.  
  231. Rotate
  232. RO n <term>
  233. RO <term>
  234.         Rotate the page to 0 or 90 degrees.  Used for making plots in
  235.         portrait mode. n can either be 0 or 90.  If no parameters are
  236.         given then n is taken to be 0. P1 an P2 rotate with the coordinate
  237.         system, but they maintain the same (x,y) positions.  This means that
  238.         P2 can be located outside the drawing area.  Following a RO 90; by
  239.         an IP; will set P1 and P2 to the soft-clip limits.
  240.  
  241.  
  242.  
  243. Select Alternate Character Set
  244. SA <term>
  245.         Future labels will be drawn using the alternate character set as
  246.         the font.  This font can be set using the CA command.
  247.  
  248.  
  249. Scale
  250. SC Xmin, Xmax, Ymin, Ymax <term>
  251. SC <term>
  252.         Establishes a user-coordinate system by mapping values onto the
  253.         scaling points P1, P2.  All subsequent moves will be interpretted
  254.         as coordinates in this coordinated system.  If no parameters are 
  255.         given the scaling is turned off.
  256.  
  257.  
  258.  
  259. Absolute Character Size
  260. SI width, height <term>
  261. Si <term>
  262.         Specifies the size of character in centimeters.  This establishes
  263.         character sizes regardless of the locations of the scaling points.
  264.         With no parameters, the default sizes are used.
  265.  
  266.  
  267. Character Slant
  268. SL tan_angle <term>
  269. SL <term>
  270.         Specifies the slant given to characters as they are drawn.
  271.         Makes tht font look more like an italic font. tan_angle specifies
  272.         how far off the vertical the font is slanted. Positive values
  273.         slant the font clockwise off the vertical, negative values
  274.         slant the font counter-clockwise.  With no parameter, the font
  275.         is not slanted at all.
  276.  
  277.  
  278. Symbol Mode
  279. SM character <term>
  280. SM <term>
  281.         Places the plotter in symbol mode. On subsequent moves the
  282.         character specified will be plotted at the various endpoints.
  283.         Used for scatter plots and emphasizing line endpoints.  With
  284.         no parameters, symbol mode is turned off.
  285.  
  286.  
  287. Select Pen
  288. SP pen_number <term>
  289. SP <term>
  290.         Use pen_number as the current pen.  With no parameters, the pen
  291.         is returned to the carousel.  Pens can be different colors
  292.         or different thicknesses.
  293.         0 <= pen_number <= 8
  294.  
  295.  
  296. Relative Character Size
  297. SR width, height <term>
  298. SR <term>
  299.         Specifies the relative character size as a percentage of the 
  300.         distance between P1 and P2.  When the positions of P1 and P2
  301.         change, the size of the characters will also change to maintain the
  302.         scale.  Without parameters, the default sizes are used.
  303.  
  304.  
  305. Select Standard Character Set
  306. SS <term>
  307.         Use the standard character set as the current font.  The font
  308.         used as the standard character set can be set using the CS command.
  309.  
  310.  
  311. Tick Length
  312. TL tp (, tn) <term>
  313. TL <term>
  314.         Specifies the length of the tick marks for both the X and Y-axes.
  315.         tp is the length of the positive portion of the tick (up or right), 
  316.         tn is the length of the negative portion of the tick (down or left).
  317.         tp an tn are specified as a percentage of |P2x - P1x| and
  318.         |P2y - P1y|.  Y-ticks use |P2x - P1x|, X-ticks use |P2y - P1y|.
  319.         To supress the negative portion of the tick, don not specify
  320.         a tn.  To supress the positive portion of the tick, specify 0 for the
  321.         tp.
  322.  
  323.  
  324. X-axis Tick
  325. XT <term>
  326.         Place a verticl tick mark at the current pen position.  The length
  327.         of the tick can be specified through the use of the TL command.
  328.  
  329.  
  330.  
  331. Y-axis Tick
  332. YT <term>
  333.         Place a horizontal tick mark at the current pen position.  The
  334.         length of the tick can be specified through the use of the TL
  335.         command.  
  336.  
  337.